<div id="img_viewer">
	<a href="<?php echo gif_url(@$gif_prev->gif_id); ?>" data-id="<?php echo $gif_next->gif_id ?>" class="ctrl_left"></a>
	<a href="<?php echo gif_url(@$gif_next->gif_id); ?>" data-id="<?php echo $gif_next->gif_id ?>" class="ctrl_right"></a>
	<img id="viewer"src="<?php echo $gif->gif_link ?>" alt="" />
</div>
<style type="text/css">
#img_viewer {
	width: 100%;
	min-height: 400px;position:relative;
}
#img_viewer img {
	position:absolute;
    top:0;
    bottom:0;
	left: 0;
	right: 0;
    margin:auto;
	max-width: 100%;
}
#img_viewer a.ctrl_left{
	float: left;
}
#img_viewer a.ctrl_right ,#img_viewer a.ctrl_left{
	min-height:400px;
	width: 200px;
}
#img_viewer a.ctrl_right{
	float: right;
}
</style>
<script type="text/javascript">
	$(function (){
		#('#viewer').error(function (){
			$.post();
		});
	})
</script>